﻿@if (typeof(Inovout.Data.Domain.DataObject).IsAssignableFrom(Html.ViewData.ModelMetadata.ModelType) &&
    Model != null && !((Inovout.Data.Domain.DataObject)Model).IsTransient)
{
    @Html.Hidden("Id")
}
<div class="row form-inline">
    <div class="col-md-10">
        @foreach (var property in Html.ViewData.ModelMetadata.Properties)
        {
            <div class="form-group col-xs-4">@Html.Label(property.PropertyName, new { })
                @Html.Editor(property.PropertyName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessage(property.PropertyName)
            </div>
        }
    </div>
    <div class="col-md-2">
        @Html.Submit("保存", new { @class = "btn btn-default btn-primary" })
    </div>
</div>
